<extend name="Public/common" />
<block name="style">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/article_list.css">
</block>
<block name="body">
    <div style="padding-top: 20px">
        <div class="am-g am-container">
            <div class="am-u-lg-6 am-u-sm-12">
                <div style="padding-left: 5px">
                    <form class="am-form-inline" role="form" action="{:U('Home/Article/myArticleList')}" method="get">
                        <div class="am-form-group">
                            <input type="text" name="keyword" class="am-form-field" placeholder="搜索内容">
                        </div>
                        <button type="submit" class="am-btn am-btn-success">查询</button>
                    </form>
                </div>
            </div>
            <div class="am-u-lg-2 am-u-sm-12">
                <a href="{:U('Home/Article/add')}" class="am-btn am-btn-danger">添加文章</a>
            </div>
            <div class="am-u-lg-4 am-u-sm-12"></div>
        </div>
        <br>
        <div class="am-g am-container">
            <div class="am-u-lg-8 am-u-sm-12">
                <table class="am-table">
                    <thead>
                    <tr>
                        <th>标题</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <volist name="_articleList" id="vo">
                            <tr>
                                <td>
                                    <a target="_blank" href="{:U('Home/Article/detail',array('article_id'=>$vo['article_id']))}">{$vo['title']}</a>
                                </td>
                                <td>
                                    <if condition=" $vo['status'] eq 1 ">
                                        正常
                                        <else/>
                                        待审核
                                    </if>
                                </td>
                                <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
                                <td><a href="{:U('Home/Article/edit',array('article_id'=>$vo['article_id']))}" >编辑</a></td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
            <div class="am-u-lg-4 am-u-sm-12">
                <section class="am-panel am-panel-default">
                    <header class="am-panel-hd">
                        <h3 class="am-panel-title">小热门</h3>
                    </header>
                    <ul class="am-list am-list-static">
                        <volist name="_ggList" id="ggvo">
                            <li>
                                <a href="{:U('Home/Article/detail',array('article_id'=>$ggvo['article_id']))}" style="padding: 0">{$ggvo['title']}</a>
                            </li>
                        </volist>
                    </ul>
                </section>
            </div>
        </div>
    </div>
</block>
<block name="script">
    <script>
        highlight_subnav("{:U('Home/Article/myArticleList',array('category_id'=>I('category_id')))}");
    </script>
</block>
